
#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>

#define RED "\033[0;32;31m"
#define NONE "\033[m"

typedef struct RBNode {
    int value;
    struct RBNode* left;
    struct RBNode* right;
    struct RBNode* parent;
    int isRed;
    int isLeft;
} RBNode;

RBNode* RBInsert(RBNode ** root, int value);
void RBRemove(RBNode** root, int value);
void RBPrint(RBNode* root);
void RBWrite(RBNode* root);
void RBClear();